from sam import import_txt_path
from sam.app.base import cut_stats_export
from sam.util.fileUtil2 import read_file


class DouBanAnalysis(object):

    def __init__(self):
        super().__init__()

    def complaint_content_analysis(self):
        complaint_content_list = read_file(file_path=import_txt_path)
        # new_complaint_content_list = []
        # for complaint_content in complaint_content_list:
        #     if "初潮" in complaint_content or "第一次" in complaint_content:
        #         new_complaint_content_list.append(complaint_content)

        cut_stats_export(line_list=complaint_content_list, export_file_name="我向许多人打听过你-分词")

    def main(self):
        self.complaint_content_analysis()


def hei_mao_complaint_analysis():
    process = DouBanAnalysis()
    process.main()


if __name__ == "__main__":
    hei_mao_complaint_analysis()
